package cn.xiaopengstack.infrastructure.persistent.dao;

import cn.xiaopengstack.infrastructure.persistent.po.GroupBuyActivity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
* @author jiangyangang
* @description 针对表【group_buy_activity(拼团活动)】的数据库操作Mapper
* @createDate 2025-10-10 15:35:56
* @Entity cn.xiaopengstack.infrastructure.persistent.po.GroupBuyActivity
*/
@Mapper
public interface IGroupBuyActivityDao {


    int insertSelective(GroupBuyActivity record);

    int updateByPrimaryKeySelective(GroupBuyActivity record);

    /**
     * 查询活动详情
     * @param activityId
     * @return
     */
    GroupBuyActivity queryByActivityId(@Param("activityId") Long activityId);

    /**
     * 查询用户参与的活动次数
     * @param activityId
     * @param userId
     * @return
     */
    Integer queryOrderCountByActivityId(@Param("activityId") Long activityId, @Param("userId") String userId);
}
